/// @file CoordinateTransformer.h
#pragma once
#include <core/ContainerWidget.h>

namespace qtangram {
    /// @class CoorfinateTransformer
    /// @brief Tool for calculating the screen and world coordinates.
    class CoordinateTransformer {
    public:
    /// Converts world point to screen
    static QPoint worldToScreen(const ContainerWidget* widget, const QPointF& point);
    /// Converts screen point to world
    static QPointF screenToWorld(const ContainerWidget* widget, const QPoint& point);
    /// Converts world polygon to screen
    static QPolygon worldToScreen(const ContainerWidget* widget, const QPolygonF& polygon);
    /// Converts screen polygon to world
    static QPolygonF screenToWorld(const ContainerWidget* widget, const QPolygon& polygon);
    };
}
